﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RSSReader.classesCustom;

namespace RSSReader.pageswithContent.tests
{
    public partial class TestSessionVar : System.Web.UI.Page
    {
        private UserDataHandler udh;        

        protected void Page_Load(object sender, EventArgs e)
        {            
            udh = (UserDataHandler)Session["userDataHandler"];
        }

        protected void vizibilCheckBox_CheckChange(object sender, EventArgs e)
        {
            CheckBox cb = (CheckBox)sender;
            ListViewItem item = (ListViewItem)cb.NamingContainer;
            ListViewDataItem dataItem = (ListViewDataItem)item;
            String code = ListView1.DataKeys[dataItem.DisplayIndex].Value.ToString();
            Page.Response.Redirect(Page.Request.Url.ToString(), true);
            //Page.Response.Redirect("/pageswithContent/onlineContent.aspx", true);
        }


        protected void ObjectDataSource1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
        {
            e.ObjectInstance = udh;
        }
    }
}